using ConsoleApi.Models;

namespace ConsoleApi.Services.Interfaces;

/// <summary>
/// 真实天气服务接口
/// </summary>
public interface IRealWeatherService
{
    /// <summary>
    /// 根据城市名称获取天气信息
    /// </summary>
    /// <param name="city">城市名称</param>
    /// <returns>天气数据</returns>
    Task<WeatherData> GetWeatherByCityAsync(string city);
    
    /// <summary>
    /// 获取天气预警信息
    /// </summary>
    /// <param name="city">城市名称</param>
    /// <returns>预警信息列表</returns>
    Task<List<string>> GetWeatherAlertsAsync(string city);
    
    /// <summary>
    /// 获取空气质量信息
    /// </summary>
    /// <param name="city">城市名称</param>
    /// <returns>空气质量数据</returns>
    Task<AirQualityData> GetAirQualityAsync(string city);
}

/// <summary>
/// 空气质量数据模型
/// </summary>
public class AirQualityData
{
    public string City { get; set; } = string.Empty;
    public int Aqi { get; set; }
    public string Level { get; set; } = string.Empty;
    public string Primary { get; set; } = string.Empty;
    public DateTime UpdateTime { get; set; }
} 